package com.bkgy.modular.oneTouchQuality.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.oneTouchQuality.service.CurveAnalysisService;
import com.bkgy.modular.oneTouchQuality.service.OneTouchQualityService;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ZhuHongKai
 * @version 1.0
 * @ClassName OneTouchQualityController
 * @date 2022/12/16 13:33
 */
@RestController
@RequestMapping("/oneTouchQuality")
public class OneTouchQualityController {
    @Resource
    private OneTouchQualityService qualityService;

    @Resource
    private CurveAnalysisService curveAnalysisService;

    @PostMapping("/findByData")
    public ResultData findOneTouchQualityData(@RequestBody JSONObject jsonObject){
        return qualityService.queryData(jsonObject);
    }

    @PostMapping("/findByData2")
    public ResultData findOneTouchQualityData2(@RequestBody JSONObject jsonObject){
        return qualityService.queryData2(jsonObject);
    }

    /**
     * 曲綫
     */
    @PostMapping("/curveAnalysis")
    public ResultData curveAnalysis(@RequestBody JSONObject jsonObject) {
        return curveAnalysisService.curveAnalysis(jsonObject);
    }

    @PostMapping("/curveAnalysis2")
    public ResultData curveAnalysis2(@RequestBody JSONObject jsonObject) {
        return curveAnalysisService.curveAnalysis2(jsonObject);
    }
}
